package com.jacksay.vikingfl.synchro
{
	import mx.controls.ComboBox;
	import mx.core.IFactory;
	import mx.events.ListEvent;

	public class VOResolveCombo extends ComboBox implements IFactory
	{
		public function VOResolveCombo()
		{
			super();
			dataProvider = ["Concerver ma donnée","Utiliser la donnée entrante"]
			addEventListener(ListEvent.CHANGE, updateDecision, false, 0, true);
		}
		
		protected function updateDecision( e:ListEvent ) :void {
			data.choix = selectedIndex;
		}
		
		public function newInstance():* {
			return new VOResolveCombo();
		}
		
		override public function set data(value:Object):void {
			super.data = value;
			selectedIndex = data.choix;
		}
		
	}
}